actually builds and runs properly on big endian machines now, because we
authorManish Singh <yosh@src.gnome.org>
Wed, 22 Jul 1998 22:22:05 +0000 (22:22 +0000)
committerManish Singh <yosh@src.gnome.org>
Wed, 22 Jul 1998 22:22:05 +0000 (22:22 +0000)
* gdk/gdkrgb.c: actually builds and runs properly on big endian machines
now, because we #include config.h. Also fixed up a compile error in the
WORDS_BIGENDIAN case in gdk_rgb_convert_565_gray. I made the fix by looking
at patterns in the other code; Raph can you verify this?

* gdk/gdkthreads.c: #include <unistd.h> to quell compiler warnings

-Yosh

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdkrgb.c
gdk/gdkthreads.c

index b7a1b325ae0f56f6169170500140ef48f48afa99..13a21e47cb7131c3a47b4fc42bb01b6d98261743 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gdk/gdkrgb.c: actually builds and runs properly on big
+       endian machines now, because we #include config.h. Also
+       fixed up a compile error in the WORDS_BIGENDIAN case in
+       gdk_rgb_convert_565_gray. I made the fix by looking at
+       patterns in the other code; Raph can you verify this?
+
+       * gdk/gdkthreads.c: #include <unistd.h> to quell compiler
+       warnings
+
 Wed Jul 22 23:00:44 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse) 
@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998  Tim Janik  <timj@gtk.org>
        * gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
        child if it isn't a label.
 
->>>>>>> 1.520
 Tue Jul 14 11:41:38 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkdialog.h: 
index b7a1b325ae0f56f6169170500140ef48f48afa99..13a21e47cb7131c3a47b4fc42bb01b6d98261743 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gdk/gdkrgb.c: actually builds and runs properly on big
+       endian machines now, because we #include config.h. Also
+       fixed up a compile error in the WORDS_BIGENDIAN case in
+       gdk_rgb_convert_565_gray. I made the fix by looking at
+       patterns in the other code; Raph can you verify this?
+
+       * gdk/gdkthreads.c: #include <unistd.h> to quell compiler
+       warnings
+
 Wed Jul 22 23:00:44 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse) 
@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998  Tim Janik  <timj@gtk.org>
        * gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
        child if it isn't a label.
 
->>>>>>> 1.520
 Tue Jul 14 11:41:38 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkdialog.h: 
index b7a1b325ae0f56f6169170500140ef48f48afa99..13a21e47cb7131c3a47b4fc42bb01b6d98261743 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gdk/gdkrgb.c: actually builds and runs properly on big
+       endian machines now, because we #include config.h. Also
+       fixed up a compile error in the WORDS_BIGENDIAN case in
+       gdk_rgb_convert_565_gray. I made the fix by looking at
+       patterns in the other code; Raph can you verify this?
+
+       * gdk/gdkthreads.c: #include <unistd.h> to quell compiler
+       warnings
+
 Wed Jul 22 23:00:44 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse) 
@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998  Tim Janik  <timj@gtk.org>
        * gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
        child if it isn't a label.
 
->>>>>>> 1.520
 Tue Jul 14 11:41:38 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkdialog.h: 
index b7a1b325ae0f56f6169170500140ef48f48afa99..13a21e47cb7131c3a47b4fc42bb01b6d98261743 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gdk/gdkrgb.c: actually builds and runs properly on big
+       endian machines now, because we #include config.h. Also
+       fixed up a compile error in the WORDS_BIGENDIAN case in
+       gdk_rgb_convert_565_gray. I made the fix by looking at
+       patterns in the other code; Raph can you verify this?
+
+       * gdk/gdkthreads.c: #include <unistd.h> to quell compiler
+       warnings
+
 Wed Jul 22 23:00:44 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse) 
@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998  Tim Janik  <timj@gtk.org>
        * gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
        child if it isn't a label.
 
->>>>>>> 1.520
 Tue Jul 14 11:41:38 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkdialog.h: 
index b7a1b325ae0f56f6169170500140ef48f48afa99..13a21e47cb7131c3a47b4fc42bb01b6d98261743 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gdk/gdkrgb.c: actually builds and runs properly on big
+       endian machines now, because we #include config.h. Also
+       fixed up a compile error in the WORDS_BIGENDIAN case in
+       gdk_rgb_convert_565_gray. I made the fix by looking at
+       patterns in the other code; Raph can you verify this?
+
+       * gdk/gdkthreads.c: #include <unistd.h> to quell compiler
+       warnings
+
 Wed Jul 22 23:00:44 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse) 
@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998  Tim Janik  <timj@gtk.org>
        * gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
        child if it isn't a label.
 
->>>>>>> 1.520
 Tue Jul 14 11:41:38 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkdialog.h: 
index b7a1b325ae0f56f6169170500140ef48f48afa99..13a21e47cb7131c3a47b4fc42bb01b6d98261743 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gdk/gdkrgb.c: actually builds and runs properly on big
+       endian machines now, because we #include config.h. Also
+       fixed up a compile error in the WORDS_BIGENDIAN case in
+       gdk_rgb_convert_565_gray. I made the fix by looking at
+       patterns in the other code; Raph can you verify this?
+
+       * gdk/gdkthreads.c: #include <unistd.h> to quell compiler
+       warnings
+
 Wed Jul 22 23:00:44 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse) 
@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998  Tim Janik  <timj@gtk.org>
        * gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
        child if it isn't a label.
 
->>>>>>> 1.520
 Tue Jul 14 11:41:38 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkdialog.h: 
index b7a1b325ae0f56f6169170500140ef48f48afa99..13a21e47cb7131c3a47b4fc42bb01b6d98261743 100644 (file)
@@ -1,3 +1,14 @@
+Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * gdk/gdkrgb.c: actually builds and runs properly on big
+       endian machines now, because we #include config.h. Also
+       fixed up a compile error in the WORDS_BIGENDIAN case in
+       gdk_rgb_convert_565_gray. I made the fix by looking at
+       patterns in the other code; Raph can you verify this?
+
+       * gdk/gdkthreads.c: #include <unistd.h> to quell compiler
+       warnings
+
 Wed Jul 22 23:00:44 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse) 
@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998  Tim Janik  <timj@gtk.org>
        * gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
        child if it isn't a label.
 
->>>>>>> 1.520
 Tue Jul 14 11:41:38 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkdialog.h: 
index e79d355e731df9a0139f7b39bdb2e4a541a381f1..bec679cdbab89b3051cd9375d3c602639bef7f90 100644 (file)
@@ -27,8 +27,9 @@
 
 #define ENABLE_GRAYSCALE
 
-#include <gdk/gdk.h>
-#include <gdk/gdkprivate.h>
+#include "../config.h"
+#include "gdk/gdk.h"
+#include "gdk/gdkprivate.h"
 #include "gdkrgb.h"
 
 typedef struct _GdkRgbInfo   GdkRgbInfo;
@@ -491,10 +492,10 @@ gdk_rgb_init (void)
   /* check endian sanity */
 #ifdef WORDS_BIGENDIAN
   if (((char *)byte_order)[0] == 1)
-    g_error ("gtk_rgb_init: WORDS_BIGENDIAN is defined, but this is a little endian machine.\n\n");
+    g_error ("gdk_rgb_init: WORDS_BIGENDIAN is defined, but this is a little endian machine.\n\n");
 #else
   if (((char *)byte_order)[0] != 1)
-    g_error ("gtk_rgb_init: WORDS_BIGENDIAN is not defined, but this is a little endian machine.\n\n");
+    g_error ("gdk_rgb_init: WORDS_BIGENDIAN is not defined, but this is a little endian machine.\n\n");
 #endif
 
   if (image_info == NULL)
@@ -1307,7 +1308,7 @@ gdk_rgb_convert_565_gray (GdkImage *image,
       for (x = 0; x < width; x++)
        {
          g = *bp2++;
-         ((guint16 *)obptr)[0] = ((g & 0xf8) << 8) |
+         ((guint16 *)obuf)[x] = ((g & 0xf8) << 8) |
            ((g & 0xfc) << 3) |
            (g >> 3);
        }
index 8fca4400e21bcdd634eac98a749391752b0559e6..d83375b57e0fbe06d8eec39975fcf4c925442c08 100644 (file)
@@ -21,6 +21,7 @@
 #include "gdkprivate.h"
 
 #ifdef USE_PTHREADS
+#include <unistd.h>
 #include <pthread.h>
 
 pthread_mutex_t gdk_threads_mutex = PTHREAD_MUTEX_INITIALIZER;